@using ApiGenerator.Domain.Code.LowLevel
@inherits ApiGenerator.CodeTemplatePage<LowLevelClientMethod>
@{
	LowLevelClientMethod method = Model;
	// cat API's can also exist as part of xpack namespaces now
	var contentType = method.CsharpNames.RestSpecName.Contains(".cat_") ? ", contentType: \"text/plain\"" : string.Empty;
}
@{await IncludeAsync("LowLevel/Client/Methods/MethodDocs.cshtml", method); }
		public TResponse @(method.PerPathMethodName)@(Raw("<TResponse>"))(@Raw(method.Arguments))
			where TResponse : class, ITransportResponse, new() => DoRequest@(Raw("<TResponse>"))(@method.HttpMethod, @Raw(method.UrlInCode), @(method.HasBody ? "body" : "null"), RequestParams(requestParameters@(Raw(contentType))));

@{await IncludeAsync("LowLevel/Client/Methods/MethodDocs.cshtml", method); }
		[MapsApi("@(method.CsharpNames.RestSpecName)", "@(method.MapsApiArguments)")]
		public Task@(Raw("<TResponse>")) @(method.PerPathMethodName)Async@(Raw("<TResponse>"))(@Raw(method.Arguments), CancellationToken ctx = default)
			where TResponse : class, ITransportResponse, new() => DoRequestAsync@(Raw("<TResponse>"))(@method.HttpMethod, @Raw(method.UrlInCode), ctx, @(method.HasBody ? "body" : "null"), RequestParams(requestParameters@(Raw(contentType))));
